package com.woniuxy.background.exception;

import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice //当Controller控制器出现异常后会执行该控制类中的方法
public class GlobalExceptionHandler {

    @ExceptionHandler(UnauthorizedException.class)
//    @ResponseBody
    public String unauthorizedExceptionHandler(){
        return "403";
    }

}
